package org.fude.service;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Hello world!
 *
 */
@Controller
public class App 
{
	@RequestMapping("/page")
	String test() {
		return "index";
	}
	@RequestMapping("/{page}")
	String ts(ModelMap map, @PathVariable("page") String path) {
		return path;
	}
	
	@RequestMapping("user/{page}")
	String user(ModelMap map, @PathVariable("page") String path) {
		return "user/"+ path;
	}
	@RequestMapping("background/{page}")
	String background(ModelMap map, @PathVariable("page") String path) {
		return "background/"+ path;
	}
	
	@RequestMapping("/head")
	String hd() {
		return "head";
	}
	
	@RequestMapping("pages/{pkg}/{path}.html")
	String pages(ModelMap map,  @PathVariable("pkg") String pkg, @PathVariable("path") String path) {
		return "pages/" + pkg + "/" + path;
	}
}
